package logic_task_log

import (
	v1 "Sailor/app/Sailor-console-server/api/api_task_log/v1"
	"Sailor/app/Sailor-console-server/internal/dao"
	"context"
	"github.com/gogf/gf/v2/errors/gerror"
	"github.com/gogf/gf/v2/frame/g"
)

func (s *sTaskLog) LogicTaskLogDelete(ctx context.Context, req *v1.TaskLogDeleteReq) (res *v1.TaskLogDeleteRes, err error) {

	_, err = dao.SysTaskLog.Ctx(ctx).Where(dao.SysTaskLog.Columns().Uuid, req.Uuid).Delete()
	if err != nil {
		g.Log().Error(ctx, err)
		return nil, gerror.New("删除失败")
	}
	return &v1.TaskLogDeleteRes{}, nil
}
